/*
 * @Description  :
 * @Autor        : guoxi
 * @Date         : 2022-09-27 18:46:12
 * @LastEditors  :
 * @LastEditTime : 2022-09-27 18:46:12
 * @FilePath     : \rpms\src\plugins\echarts\index.ts
 */
import * as echarts from "echarts/core";

import { LineChart, BarChart, PieChart } from "echarts/charts";

import {
  TitleComponent,
  TooltipComponent,
  GridComponent,
  ToolboxComponent,
  DataZoomComponent,
  VisualMapComponent,
  LegendComponent,
  GraphicComponent
} from "echarts/components";

import { SVGRenderer } from "echarts/renderers";

const { use, registerTheme } = echarts;

use([
  LineChart,
  BarChart,
  PieChart,
  TitleComponent,
  TooltipComponent,
  GridComponent,
  SVGRenderer,
  ToolboxComponent,
  DataZoomComponent,
  VisualMapComponent,
  LegendComponent,
  GraphicComponent
]);

// 自定义主题
import theme from "./theme.json";
registerTheme("ovilia-green", theme);

export default echarts;
